package com.maxatime.util;

import redis.clients.jedis.Jedis;

public class RedisUtil {
	
	
	public static Jedis getRedis() {
		Jedis jedis = new Jedis("127.0.0.1", 6379);
		//jedis.auth("redis.12345678");//有密码就不用隐藏，没有密码就隐藏不用使用密码链接
		System.out.println("Connection to server sucessfully");
		// check whether server is running or not
		System.out.println("Server is running: " + jedis.ping());
		return jedis;
	}
	
	

}
